/*
 * @lc app=leetcode.cn id=1020 lang=typescript
 *
 * [1020] 飞地的数量
 */

function spiralForEach(
  grid: number[][],
  callback: (c: number, i: number, j: number) => void
) {
  const [M, N] = [grid.length, grid[0]?.length as number]
  // 总圈数
  const MIN = Math.min(M, N)
  const C = Math.floor(MIN / 2) + (MIN % 2)
}

// @lc code=start
function numEnclaves(grid: number[][]): number {
  const [M, N] = [grid.length, grid[0]?.length as number]
  // 螺旋遍历矩阵
}
// @lc code=end
